package com.kefu.call.vo;

import cn.hutool.core.date.DateUtil;
import com.kefu.common.context.KefuContext;
import com.kefu.common.vo.AbstractInsertVo;
import com.kefu.call.model.CdrRghistory;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * @author CodeGenerator
 * @date 2022/07/26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@ApiModel(description = "计费_充值表")
public class CdrRghistoryInsertVo extends AbstractInsertVo<CdrRghistory> {

    @ApiModelProperty(value = "公司ID")
    private String company;
    
    @ApiModelProperty(value = "充值金额")
    private String rgmoney;

    @ApiModelProperty(value = "备注")
    private String remarks;


    @Override
    public CdrRghistory convert() {
        CdrRghistory info = new CdrRghistory();
	    info.setCompany(company);
	    info.setRgmoney(rgmoney);
        info.setRemarks(remarks);
	    info.setCreatetime(DateUtil.date());
        KefuContext context = KefuContext.getKefuContext();
        info.setRgpeopel(context.getUserName());

        return info;
	}
}